<template>
<div>
     
     <div class="md-modal modal-msg md-modal-transition" @click="parentmethod"  v-bind:class="[{'md-show':showalert||showsuccess||delcar}]" >
          <div class="md-modal-inner">
            <div class="md-top">
              <button class="md-close" @click="parentsuccessmethod">Close</button>
            </div>
            <div class="md-content">
              <div class="confirm-tips">
                <div class="error-wrap">
               <slot name="error"></slot>
               <slot name="success"></slot>
                </div>
               
              </div>
              <div class="btn-wrap">
              <slot name="gotocar"></slot>
              <slot name="shutdown"></slot>
            </div>
            </div>
          </div>
         
        </div>
          <div class="md-overlay" v-if="showalert || showsuccess"></div>
       </div>
</template>


<script>
    export default {
        data () {
            return {
                mdflag:false,
                
               
            }
        },
        methods: {
            switchalert(){
                this.showalert=!this.showalert
            },
            parentmethod(){
              this.$emit('close')
            },
            parentsuccessmethod(){
                this.$emit('successclose')         
            }
          },  
        props: ['showalert','showsuccess','delcar']
          }
</script>